<?php

use LowCode\Menu;
use LowCode\MenuRouter;

Menu::group(["name"=>"dashboard","title"=>"概览","path"=>"/"], function (MenuRouter $router){
    $router->icon("lucide:layout-dashboard")->redirect("/home");
    $router->children([
        MenuRouter::make("控制台","Home","/home","PageLayout")->icon("mdi:home")->affixTab(true)->keepAlive(true),
        MenuRouter::make("分析页","Analytics","/analytics","PageLayout")->icon("lucide:area-chart"),
        MenuRouter::make("工作台","Workspace","/workspace","PageLayout")->icon("carbon:workspace"),
        MenuRouter::make("安装页","Install","/install1","PageLayout")->icon("carbon:workspace"),
//        MenuRouter::make(["name"=>"Install","title"=>"安装","path"=>"/install"])->component("PageLayout")->ignoreAccess(true)
    ]);
});

Menu::group(["name"=>"Demo","title"=>"演示","path"=>"/demo"], function (MenuRouter $router){
    $router->icon("token-branded:blox")->redirect("/demo/button");
    $router->children([
        MenuRouter::make("按钮示例","ButtonDemos","/demo/button","PageLayout")->icon("token-branded:bitci"),
    ]);
});

Menu::group(["name"=>"AccessDemos","title"=>"演示","path"=>"/naive"], function (MenuRouter $router){
    $router->icon("ic:baseline-view-in-ar")->redirect("/naive/index");
    $router->children([
        MenuRouter::make("Naive","NaiveDemos","/naive/index","PageLayout")->icon("lucide:area-chart"),
        MenuRouter::make("Table","TableDemos","/naive/table","PageLayout")->icon("mdi:shield-key-outline"),
//        MenuRouter::make("AntDesign","AntDesign","/demos/ant-design","/views/demos/antd/index.vue")->icon("mdi:shield-key-outline"),
    ]);
});

Menu::group(["name"=>"About","title"=>"关于","path"=>"/about"], function (MenuRouter $router){
    $router->icon("ic:baseline-view-in-ar")->redirect("/about/index")->hideChildrenInMenu(true);
    $router->children([
        MenuRouter::make("关于","AboutDemos","/about/index","PageLayout")->icon("lucide:area-chart")->hideInMenu(true)->activePath("/about"),
    ]);
});

Menu::group(["name"=>"Lowcode","title"=>"低代码","path"=>"/lowcode"], function (MenuRouter $router){
    $router->icon("ic:baseline-view-in-ar")->redirect("/lowcode/index")->hideChildrenInMenu(true);
    $router->children([
        MenuRouter::make("低代码","LowcodeDemo","/lowcode/index","PageLayout")->icon("lucide:area-chart")
            ->hideInMenu(true)->activePath("/lowcode")->iframeSrc(url("/dist/designer")),
    ]);
});

//Menu::group(["name"=>"Install","title"=>"安装","path"=>"/install"])->component("PageLayout")->ignoreAccess(true);
//Menu::group(["name"=>"AnyPath","title"=>"页面","path"=>"/:path(.*)*"])
//    ->component("PageLayout")
//    ->hideInBreadcrumb(true)
//    ->hideInMenu(true)
//    ->hideInTab(true)
//    ->ignoreAccess(true);
//MenuRouter::make("安装","Install","/install","PageLayout")->icon("lucide:area-chart")->hideInMenu(true),

//            Router::make("关于项目","AboutDemos","/about","PageLayout")->icon("lucide:area-chart"),
